<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>元素之间的空白问题</title>
    <style>
      div {
        height: 500px;
        background-color: orange;
        font-size: 0;
      }

      span {
        font-size: 20px;
      }
      .s1 {
        background-color: skyblue;
      }

      .s2 {
        background-color: aquamarine;
      }

      .s3 {
        background-color: red;
      }
      img {
        width: 100px;
      }
    </style>
  </head>
  <body>
    <!-- 行内元素和行内块元素，彼此之间的换行会被浏览器解析为一个空白字符，解决它就给父元素设置font-size为0，再给需要显示的文字元素，单独设置字体大小 -->
    <div>
      <span class="s1"> React </span>
      <span class="s2">Vue</span>
      <span class="s3">Angalar</span>
      <hr />

      <img src="../../imgs/IMG_3123.jpeg" alt="" />
      <img src="../../imgs/IMG_3132.jpeg" alt="" />
    </div>
  </body>
</html>
